//
//  ZYJAccountManager.h
//  TravelingByCar
//
//  Created by Wendale on 15-3-14.
//  Copyright (c) 2015年 ZYJ. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ICAccountInfo.h"
#import "ICMessageUnreadInfo.h"
#import "ICHostInfoItem.h"

#define IC_ACCOUNT_DID_LOGIN_NOTIFICATION  @"IC_ACCOUNT_DID_LOGIN_NOTIFICATION"
#define IC_ACCOUNT_DID_LOGOUT_NOTIFICATION  @"IC_ACCOUNT_DID_LOGOUT_NOTIFICATION"
#define IC_ACCOUNT_DID_UPDATE_NOTIFICATION  @"IC_ACCOUNT_DID_UPDATE_NOTIFICATION"
#define IC_MESSAGEUNREADCOUNT_UPDATE_NOTIFICATION  @"IC_MESSAGEUNREADCOUNT_UPDATE_NOTIFICATION"
#define IC_CHANGE_LOCATION_ADDRESS_NOTIFICATION  @"IC_CHANGE_LOCATION_ADDRESS_NOTIFICATION"
#define IC_REQUEST_DISTRIBUTOR_NOTIFICATION  @"IC_REQUEST_DISTRIBUTOR_NOTIFICATION"
#define IC_CHANGE_DEFAULT_NOTIFICATION  @"IC_CHANGE_DEFAULT_NOTIFICATION"
#define IC_CHANGE_COUPON_NOTIFICATION  @"IC_CHANGE_COUPON_NOTIFICATION"
#define IC_CHANGE_POINTS_NOTIFICATION  @"IC_CHANGE_POINTS_NOTIFICATION"
#define IC_CHOOSE_GOODS_NOTIFICATION  @"IC_CHOOSE_GOODS_NOTIFICATION"


@interface ICAccountManager : NSObject
@property(nonatomic, strong)ICAccountInfo *accountInfo;
@property(nonatomic, strong)ICMessageUnreadInfo *messageUnreadInfo;
@property(nonatomic, assign)BOOL isWillGoToLogin;
@property(nonatomic, assign)BOOL isWillGoToRegister;
@property (strong, nonatomic) ICHostInfoItem *hostItem;

//- (void)loginWithAccount:(ICAccountInfo *)userInfo;
- (void)updateAccount:(ICAccountInfo *)userInfo;
- (BOOL)isLogIn;
//登陆失效或者手动退出时调用
- (void)logout;
- (void)persistenceAccountInfo;
/**
 * 刷新用户账号信息, 刷新完成后触发EDJ_ACCOUNT_DID_UPDATED_NOTIFICATION
 */
- (void)refreshUnreadMessageCount;
- (void)refreshAccountInfo;
- (BOOL)hasShowedWelcomeView;
- (void)setWelcomeShowed;
- (void)upLoadClientId;

- (BOOL)hasShowedHomeView;
- (void)setHomeShowed;
- (BOOL)hasShowedFindProjectView;
- (void)setFindProjectShowed;
- (BOOL)hasShowedFindInvestorView;
- (void)setFindInvestorShowed;

- (NSString *)iPhoneNumber;
- (void)requestUserHost;

@end
